<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>编辑机构资料</title>
    <script src="https://cdn.tailwindcss.com"></script>
</head>
<body class="bg-neutral-100 p-6">

<div class="max-w-3xl mx-auto bg-white rounded-lg shadow p-6">
    <h2 class="text-2xl font-bold mb-6">编辑机构资料</h2>



    <form action="${pageContext.request.contextPath}/organization/updateProfile" method="post">
        <input type="hidden" name="userid" value="${organizations.userid}" /> <!-- 添加这行 -->
        <div class="mb-4">
            <label class="block text-sm font-medium mb-2">机构名称</label>
            <input type="text" name="org_name" value="${organizations.orgName}" class="w-full border rounded p-2">
        </div>

        <div class="mb-4">
            <label class="block text-sm font-medium mb-2">联系方式</label>
            <input type="text" name="contact_phone" value="${organizations.contactPhone}" class="w-full border rounded p-2">
        </div>

        <div class="mb-4">
            <label class="block text-sm font-medium mb-2">地址</label>
            <input type="text" name="address" value="${organizations.address}" class="w-full border rounded p-2">
        </div>

        <div class="mb-4">
            <label class="block text-sm font-medium mb-2">机构简介</label>
            <textarea name="description" rows="4" class="w-full border rounded p-2">${organizations.description}</textarea>
        </div>

        <div class="flex justify-end space-x-3">
            <a href="${pageContext.request.contextPath}/organization/profile" class="px-4 py-2 bg-gray-200 rounded">取消</a>
            <button type="submit" class="px-4 py-2 bg-gray-200 rounded">保存修改</button>
        </div>
    </form>
</div>

</body>
</html>
